export const table_config = () => {
    const config = {
        pageSize: 10,
        pageNum: 1,
        total: 1000,
        rowKey: "roleId", //如果需要树型数据填写这个，否则为空
        defaultColumnWidth: null,//默认的列宽

        //UI
        defaultExpandAll: false, //是否默认展开所有行
        pagingShow: true,//本页1-2
        totalShow: true,//共10条数据
        paginationShow: true,//分页

        selectionChange:true, //是否支持多选
        searchList: [
            {placeholder: '请输入请求接口', label: '请求接口', key: 'url', type: 'text'},
            {placeholder: '请输入用户名称', label: '用户名称', key: 'username', type: 'text'},
            {placeholder: '请选择', label: '时间', key: 'creatDatetime', type: 'date'},
        ],
        buttonList: [
            {name: '刷新', type: 'primary', plain: true, emitLabel: 'refresh'},
            {name: '删除', type: 'danger', plain: true, emitLabel: 'del', power:"monitor:operlog:remove"},
            {name: '清空', type: 'info', plain: true, emitLabel: 'clean', power:"monitor:operlog:remove"},
            {name: '全部导出', type: 'success', plain: true, emitLabel: 'export', power:"monitor:operlog:export"},
        ],
        tableList: [
            {label: '编号', key: 'id'},
            {label: '类型', key: 'title'},
            {label: '地址', key: 'url', width:"500"},
            {label: '方法', key: 'method'},
            {label: 'IP', key: 'userIp', },
            {label: '用户', key: 'username'},
            {label: '返回', key: 'code'},
            {label: '时间', key: 'creatDatetime', width:"200"},
            {label: '运行', key: 'runTime',suffix:"毫秒"}
        ],
        tableButton: {
            name: '操作',
            list: [
                {name: '查看', type: 'success', emitLabel: 'view', childrenDisplay: false},
            ]
        }
    }
    return config
}